org.eclipse.vtp.framework.engine.support
Class ProcessContextWrapper

java.lang.Object
  extended by org.eclipse.vtp.framework.engine.support.ProcessContextWrapper
All Implemented Interfaces:
IContext, ILogger, IProcessContext, IReporter

public abstract class ProcessContextWrapper
extends java.lang.Object
implements IProcessContext

A wrapper for the IProcessContext interface.

Author:
Lonnie Pryor

Field Summary
 
Fields inherited from interface org.eclipse.vtp.framework.core.IReporter
SEVERITY_DEBUG, SEVERITY_ERROR, SEVERITY_INFO, SEVERITY_WARN
 
Constructor Summary
protected ProcessContextWrapper()
          Creates a new ProcessContextWrapper.
 
Method Summary
 void debug(java.lang.String message)
          Creates and publishes a debug log entry with the specified attributes.
 void debug(java.lang.String[] categories, java.lang.String message)
          Creates and publishes a debug log entry with the specified attributes.
 void debug(java.lang.String[] categories, java.lang.String message, java.util.Dictionary properties)
          Creates and publishes a debug log entry with the specified attributes.
 void debug(java.lang.String message, java.util.Dictionary properties)
          Creates and publishes a debug log entry with the specified attributes.
 void error(java.lang.String message)
          Creates and publishes an error log entry with the specified attributes.
 void error(java.lang.String[] categories, java.lang.String message)
          Creates and publishes an error log entry with the specified attributes.
 void error(java.lang.String[] categories, java.lang.String message, java.util.Dictionary properties)
          Creates and publishes an error log entry with the specified attributes.
 void error(java.lang.String message, java.util.Dictionary properties)
          Creates and publishes an error log entry with the specified attributes.
protected abstract  IProcessContext getProcessContext()
          Returns the wrapped process context.
 java.lang.String getProcessID()
          Returns the ID of this process.
 java.lang.Object getProperty(java.lang.String propertyName)
          Returns the value of the process-level configuration property with the specified name or null if no such property exists.
 void info(java.lang.String message)
          Creates and publishes an informational log entry with the specified attributes.
 void info(java.lang.String[] categories, java.lang.String message)
          Creates and publishes an informational log entry with the specified attributes.
 void info(java.lang.String[] categories, java.lang.String message, java.util.Dictionary properties)
          Creates and publishes an informational log entry with the specified attributes.
 void info(java.lang.String message, java.util.Dictionary properties)
          Creates and publishes an informational log entry with the specified attributes.
 boolean isDebugEnabled()
          Returns true if the debug severity level is enabled.
 boolean isErrorEnabled()
          Returns true if the error severity level is enabled.
 boolean isInfoEnabled()
          Returns true if the informational severity level is enabled.
protected  boolean isReservedIdentifier(java.lang.String identifier)
          Returns true if the specified identifier is implemented by the context.
 boolean isSeverityEnabled(int severity)
          Returns true if the specified severity level is enabled.
 boolean isWarnEnabled()
          Returns true if the warning severity level is enabled.
 java.lang.Class loadClass(java.lang.String className)
          Loads a class visible to the process.
 void log(int severity, java.lang.String message)
          Creates and publishes a log entry with the specified attributes.
 void log(int severity, java.lang.String[] categories, java.lang.String message)
          Creates and publishes a log entry with the specified attributes.
 void log(int severity, java.lang.String[] categories, java.lang.String message, java.util.Dictionary properties)
          Creates and publishes a log entry with the specified attributes.
 void log(int severity, java.lang.String message, java.util.Dictionary properties)
          Creates and publishes a log entry with the specified attributes.
 java.lang.Object lookup(java.lang.String identifier)
          Looks up the service selected for the specified identifier or null if no such service exists.
 java.lang.Object[] lookupAll(java.lang.String identifier)
          Returns an array containing all the services registered under the specified identifier.
 void report(int severity, java.lang.String message)
          Creates and publishes a reporting entry with the specified attributes.
 void report(int severity, java.lang.String[] categories, java.lang.String message)
          Creates and publishes a reporting entry with the specified attributes.
 void report(int severity, java.lang.String[] categories, java.lang.String message, java.util.Dictionary properties)
          Creates and publishes a reporting entry with the specified attributes.
 void report(int severity, java.lang.String message, java.util.Dictionary properties)
          Creates and publishes a reporting entry with the specified attributes.
 void warn(java.lang.String message)
          Creates and publishes a warning log entry with the specified attributes.
 void warn(java.lang.String[] categories, java.lang.String message)
          Creates and publishes a warning log entry with the specified attributes.
 void warn(java.lang.String[] categories, java.lang.String message, java.util.Dictionary properties)
          Creates and publishes a warning log entry with the specified attributes.
 void warn(java.lang.String message, java.util.Dictionary properties)
          Creates and publishes a warning log entry with the specified attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessContextWrapper

protected ProcessContextWrapper()
Creates a new ProcessContextWrapper.

Method Detail

isReservedIdentifier

protected boolean isReservedIdentifier(java.lang.String identifier)
Returns true if the specified identifier is implemented by the context.

Parameters:
identifier - The identifier to check.
Returns:
True if the specified identifier is implemented by the context.

getProcessContext

protected abstract IProcessContext getProcessContext()
Returns the wrapped process context.

Returns:
The wrapped process context.

isSeverityEnabled

public boolean isSeverityEnabled(int severity)
Description copied from interface: IReporter
Returns true if the specified severity level is enabled.

Specified by:
isSeverityEnabled in interface IReporter
Parameters:
severity - The severity to check.
Returns:
True if the specified severity level is enabled.

report

public void report(int severity,
                   java.lang.String message)
Description copied from interface: IReporter
Creates and publishes a reporting entry with the specified attributes.

Specified by:
report in interface IReporter
Parameters:
severity - The severity of the report.
message - The message associated with the report or null to not include a message.

report

public void report(int severity,
                   java.lang.String message,
                   java.util.Dictionary properties)
Description copied from interface: IReporter
Creates and publishes a reporting entry with the specified attributes.

Specified by:
report in interface IReporter
Parameters:
severity - The severity of the report.
message - The message associated with the report or null to not include a message.
properties - The properties of the report or null if no properties are specified.

report

public void report(int severity,
                   java.lang.String[] categories,
                   java.lang.String message)
Description copied from interface: IReporter
Creates and publishes a reporting entry with the specified attributes.

Specified by:
report in interface IReporter
Parameters:
severity - The severity of the report.
categories - The categories the report pertains to or null if no catagories are related.
message - The message associated with the report or null to not include a message.

report

public void report(int severity,
                   java.lang.String[] categories,
                   java.lang.String message,
                   java.util.Dictionary properties)
Description copied from interface: IReporter
Creates and publishes a reporting entry with the specified attributes.

Specified by:
report in interface IReporter
Parameters:
severity - The severity of the report.
categories - The categories the report pertains to or null if no catagories are related.
message - The message associated with the report or null to not include a message.
properties - The properties of the report or null if no properties are specified.

log

public void log(int severity,
                java.lang.String message)
Description copied from interface: ILogger
Creates and publishes a log entry with the specified attributes.

Specified by:
log in interface ILogger
Parameters:
severity - The severity of the log entry.
message - The message associated with the log entry or null to not include a message.

log

public void log(int severity,
                java.lang.String message,
                java.util.Dictionary properties)
Description copied from interface: ILogger
Creates and publishes a log entry with the specified attributes.

Specified by:
log in interface ILogger
Parameters:
severity - The severity of the log entry.
message - The message associated with the log entry or null to not include a message.
properties - The properties of the log entry or null if no properties are specified.

log

public void log(int severity,
                java.lang.String[] categories,
                java.lang.String message)
Description copied from interface: ILogger
Creates and publishes a log entry with the specified attributes.

Specified by:
log in interface ILogger
Parameters:
severity - The severity of the log entry.
categories - The categories the log entry pertains to or null if no catagories are related.
message - The message associated with the log entry or null to not include a message.

log

public void log(int severity,
                java.lang.String[] categories,
                java.lang.String message,
                java.util.Dictionary properties)
Description copied from interface: ILogger
Creates and publishes a log entry with the specified attributes.

Specified by:
log in interface ILogger
Parameters:
severity - The severity of the log entry.
categories - The categories the log entry pertains to or null if no catagories are related.
message - The message associated with the log entry or null to not include a message.
properties - The properties of the log entry or null if no properties are specified.

isErrorEnabled

public boolean isErrorEnabled()
Description copied from interface: ILogger
Returns true if the error severity level is enabled.

Specified by:
isErrorEnabled in interface ILogger
Returns:
True if the error severity level is enabled.

error

public void error(java.lang.String message)
Description copied from interface: ILogger
Creates and publishes an error log entry with the specified attributes.

Specified by:
error in interface ILogger
Parameters:
message - The message associated with the log entry or null to not include a message.

error

public void error(java.lang.String message,
                  java.util.Dictionary properties)
Description copied from interface: ILogger
Creates and publishes an error log entry with the specified attributes.

Specified by:
error in interface ILogger
Parameters:
message - The message associated with the log entry or null to not include a message.
properties - The properties of the log entry or null if no properties are specified.

error

public void error(java.lang.String[] categories,
                  java.lang.String message)
Description copied from interface: ILogger
Creates and publishes an error log entry with the specified attributes.

Specified by:
error in interface ILogger
Parameters:
categories - The categories the log entry pertains to or null if no catagories are related.
message - The message associated with the log entry or null to not include a message.

error

public void error(java.lang.String[] categories,
                  java.lang.String message,
                  java.util.Dictionary properties)
Description copied from interface: ILogger
Creates and publishes an error log entry with the specified attributes.

Specified by:
error in interface ILogger
Parameters:
categories - The categories the log entry pertains to or null if no catagories are related.
message - The message associated with the log entry or null to not include a message.
properties - The properties of the log entry or null if no properties are specified.

isWarnEnabled

public boolean isWarnEnabled()
Description copied from interface: ILogger
Returns true if the warning severity level is enabled.

Specified by:
isWarnEnabled in interface ILogger
Returns:
True if the warning severity level is enabled.

warn

public void warn(java.lang.String message)
Description copied from interface: ILogger
Creates and publishes a warning log entry with the specified attributes.

Specified by:
warn in interface ILogger
Parameters:
message - The message associated with the log entry or null to not include a message.

warn

public void warn(java.lang.String message,
                 java.util.Dictionary properties)
Description copied from interface: ILogger
Creates and publishes a warning log entry with the specified attributes.

Specified by:
warn in interface ILogger
Parameters:
message - The message associated with the log entry or null to not include a message.
properties - The properties of the log entry or null if no properties are specified.

warn

public void warn(java.lang.String[] categories,
                 java.lang.String message)
Description copied from interface: ILogger
Creates and publishes a warning log entry with the specified attributes.

Specified by:
warn in interface ILogger
Parameters:
categories - The categories the log entry pertains to or null if no catagories are related.
message - The message associated with the log entry or null to not include a message.

warn

public void warn(java.lang.String[] categories,
                 java.lang.String message,
                 java.util.Dictionary properties)
Description copied from interface: ILogger
Creates and publishes a warning log entry with the specified attributes.

Specified by:
warn in interface ILogger
Parameters:
categories - The categories the log entry pertains to or null if no catagories are related.
message - The message associated with the log entry or null to not include a message.
properties - The properties of the log entry or null if no properties are specified.

isInfoEnabled

public boolean isInfoEnabled()
Description copied from interface: ILogger
Returns true if the informational severity level is enabled.

Specified by:
isInfoEnabled in interface ILogger
Returns:
True if the informational severity level is enabled.

info

public void info(java.lang.String message)
Description copied from interface: ILogger
Creates and publishes an informational log entry with the specified attributes.

Specified by:
info in interface ILogger
Parameters:
message - The message associated with the log entry or null to not include a message.

info

public void info(java.lang.String message,
                 java.util.Dictionary properties)
Description copied from interface: ILogger
Creates and publishes an informational log entry with the specified attributes.

Specified by:
info in interface ILogger
Parameters:
message - The message associated with the log entry or null to not include a message.
properties - The properties of the log entry or null if no properties are specified.

info

public void info(java.lang.String[] categories,
                 java.lang.String message)
Description copied from interface: ILogger
Creates and publishes an informational log entry with the specified attributes.

Specified by:
info in interface ILogger
Parameters:
categories - The categories the log entry pertains to or null if no catagories are related.
message - The message associated with the log entry or null to not include a message.

info

public void info(java.lang.String[] categories,
                 java.lang.String message,
                 java.util.Dictionary properties)
Description copied from interface: ILogger
Creates and publishes an informational log entry with the specified attributes.

Specified by:
info in interface ILogger
Parameters:
categories - The categories the log entry pertains to or null if no catagories are related.
message - The message associated with the log entry or null to not include a message.
properties - The properties of the log entry or null if no properties are specified.

isDebugEnabled

public boolean isDebugEnabled()
Description copied from interface: ILogger
Returns true if the debug severity level is enabled.

Specified by:
isDebugEnabled in interface ILogger
Returns:
True if the debug severity level is enabled.

debug

public void debug(java.lang.String message)
Description copied from interface: ILogger
Creates and publishes a debug log entry with the specified attributes.

Specified by:
debug in interface ILogger
Parameters:
message - The message associated with the log entry or null to not include a message.

debug

public void debug(java.lang.String message,
                  java.util.Dictionary properties)
Description copied from interface: ILogger
Creates and publishes a debug log entry with the specified attributes.

Specified by:
debug in interface ILogger
Parameters:
message - The message associated with the log entry or null to not include a message.
properties - The properties of the log entry or null if no properties are specified.

debug

public void debug(java.lang.String[] categories,
                  java.lang.String message)
Description copied from interface: ILogger
Creates and publishes a debug log entry with the specified attributes.

Specified by:
debug in interface ILogger
Parameters:
categories - The categories the log entry pertains to or null if no catagories are related.
message - The message associated with the log entry or null to not include a message.

debug

public void debug(java.lang.String[] categories,
                  java.lang.String message,
                  java.util.Dictionary properties)
Description copied from interface: ILogger
Creates and publishes a debug log entry with the specified attributes.

Specified by:
debug in interface ILogger
Parameters:
categories - The categories the log entry pertains to or null if no catagories are related.
message - The message associated with the log entry or null to not include a message.
properties - The properties of the log entry or null if no properties are specified.

lookup

public java.lang.Object lookup(java.lang.String identifier)
                        throws java.lang.NullPointerException
Description copied from interface: IContext
Looks up the service selected for the specified identifier or null if no such service exists.

Specified by:
lookup in interface IContext
Parameters:
identifier - The identifier of the service to look up.
Returns:
The service selected for the specified identifier or null if no such service exists.
Throws:
java.lang.NullPointerException - If the supplied identifier is null.

lookupAll

public java.lang.Object[] lookupAll(java.lang.String identifier)
                             throws java.lang.NullPointerException
Description copied from interface: IContext
Returns an array containing all the services registered under the specified identifier.

Specified by:
lookupAll in interface IContext
Parameters:
identifier - The identifier of the services to look up.
Returns:
An array containing all the services registered under the specified identifier.
Throws:
java.lang.NullPointerException - If the supplied identifier is null.

getProcessID

public java.lang.String getProcessID()
Description copied from interface: IProcessContext
Returns the ID of this process.

Specified by:
getProcessID in interface IProcessContext
Returns:
The ID of this process.

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
                             throws java.lang.NullPointerException
Description copied from interface: IProcessContext
Returns the value of the process-level configuration property with the specified name or null if no such property exists.

Specified by:
getProperty in interface IProcessContext
Parameters:
propertyName - The name of the configuration property to return.
Returns:
The value of the process-level configuration property with the specified name or null if no such property exists.
Throws:
java.lang.NullPointerException - If the supplied property name is null.

loadClass

public java.lang.Class loadClass(java.lang.String className)
                          throws java.lang.ClassNotFoundException,
                                 java.lang.NullPointerException
Description copied from interface: IProcessContext
Loads a class visible to the process.

Specified by:
loadClass in interface IProcessContext
Parameters:
className - The name of the class to load.
Returns:
The requested class instance.
Throws:
java.lang.ClassNotFoundException - If a class with the specified name cannot be found.
java.lang.NullPointerException - If the supplied class name is null.